<!DOCTYPE html>
<html lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>接单页面</title>
    <script src="js/jquery-3.5.1.min.js"></script>
    <link href="layui-v2.6.4/layui/css/layui.css" rel="stylesheet" type="text/css"/>
    <link href="layui-v2.6.4/layui/css/modules/code.css" rel="stylesheet" type="text/css"/>
    <script charset="utf-8" src="layui-v2.6.4/layui/layui.js" type="text/javascript"></script>
    <script>
        layui.use('element', function () {
            var element = layui.element;
        });

        function getIt(e) {
            var li = e.id.split("-")
            var eid = li[li.length - 1];
            $.get("getOrder", {"id": eid}, function (res) {
                if (res === 1) {
                    layer.msg("接取成功");
                    layer.closeAll('loading');
                } else {
                    layer.msg("系统故障了哦!请稍后重试");
                    layer.closeAll('loading');
                }
            })
            layer.load(2);
        }
    </script>
</head>
<body>
<div class="div_top" th:replace="include/top"></div>
<div class="layui-container">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;border-color: #3e0656;">
        <legend>订单详情</legend>
    </fieldset>
    <div class="layui-row" id="xiangxi" style="border: 1px  #0000FF solid;border-left:0 ;border-right: 0;">
        <h2 th:text="${userPname}">寥寥清梦</h2>
        <h3 th:text="${EntType}+':'+${EntId}"></h3>
        <hr class="layui-bg-cyan">
        <h2>委托内容:</h2>
        <p class="layui-icon" style="padding: 20px;" th:text="'&#xe63c;'+${userData}">
            帮我取一个快递,在东门往南韵达,联系qq:1069664381,给你发取件码,我宿舍在13#907,有易损品,轻拿轻放</p>
        <h2>时间:</h2>
        <div class="layui-row" style="padding: 20px;">
            <span class="layui-col-md1 layui-icon" style="text-align: left;">&#xe61f;发布日期:</span>
            <span class="layui-col-md1" style="text-align: center;" th:text="${userCTime}">2020 1 1 1 1</span>
            <span class="layui-col-md1 layui-icon" style="text-align: left;">&#xe616;最迟期限:</span>
            <span class="layui-col-md1" style="text-align: center;" th:text="${userEtime}">2020 1 1 1 1</span>
        </div>
        <h2 class="layui-col-md12">成交金额:</h2>
        <span class="layui-icon layui-col-md12" style="padding: 20px;" th:text="'&#xe65e;'+${userMoney}"></span>
        <button class="layui-btn layui-btn-sm layui-btn-normal" onclick="getIt(this)" th:id="'btn-order-'+${EntId}">
            确认接受
        </button>
        <p>&nbsp;</p>
    </div>
</div>
</body>
</html>
